<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GDBusObjectManagerServer</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="gdbus-convenience.html" title="Highlevel D-Bus Support">
<link rel="prev" href="GDBusObjectManager.html" title="GDBusObjectManager">
<link rel="next" href="GDBusObjectManagerClient.html" title="GDBusObjectManagerClient">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GDBusObjectManager.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gdbus-convenience.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="GDBusObjectManagerClient.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GDBusObjectManagerServer.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GDBusObjectManagerServer.description" class="shortcut">Description</a>
                   | 
                  <a href="#GDBusObjectManagerServer.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GDBusObjectManagerServer.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#GDBusObjectManagerServer.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="GDBusObjectManagerServer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GDBusObjectManagerServer.top_of_page"></a>GDBusObjectManagerServer</span></h2>
<p>GDBusObjectManagerServer — Service-side object manager</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GDBusObjectManagerServer.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gio.h&gt;

                    <a class="link" href="GDBusObjectManagerServer.html#GDBusObjectManagerServer-struct" title="GDBusObjectManagerServer">GDBusObjectManagerServer</a>;
struct              <a class="link" href="GDBusObjectManagerServer.html#GDBusObjectManagerServerClass" title="struct GDBusObjectManagerServerClass">GDBusObjectManagerServerClass</a>;
<a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="returnvalue">GDBusObjectManagerServer</span></a> * <a class="link" href="GDBusObjectManagerServer.html#g-dbus-object-manager-server-new" title="g_dbus_object_manager_server_new ()">g_dbus_object_manager_server_new</a>
                                                        (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>);
<a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   <a class="link" href="GDBusObjectManagerServer.html#g-dbus-object-manager-server-get-connection" title="g_dbus_object_manager_server_get_connection ()">g_dbus_object_manager_server_get_connection</a>
                                                        (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GDBusObjectManagerServer.html#g-dbus-object-manager-server-set-connection" title="g_dbus_object_manager_server_set_connection ()">g_dbus_object_manager_server_set_connection</a>
                                                        (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GDBusObjectManagerServer.html#g-dbus-object-manager-server-export" title="g_dbus_object_manager_server_export ()">g_dbus_object_manager_server_export</a> (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GDBusObjectSkeleton.html" title="GDBusObjectSkeleton"><span class="type">GDBusObjectSkeleton</span></a> *object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GDBusObjectManagerServer.html#g-dbus-object-manager-server-export-uniquely" title="g_dbus_object_manager_server_export_uniquely ()">g_dbus_object_manager_server_export_uniquely</a>
                                                        (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GDBusObjectSkeleton.html" title="GDBusObjectSkeleton"><span class="type">GDBusObjectSkeleton</span></a> *object</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GDBusObjectManagerServer.html#g-dbus-object-manager-server-unexport" title="g_dbus_object_manager_server_unexport ()">g_dbus_object_manager_server_unexport</a>
                                                        (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GDBusObjectManagerServer.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GDBusObjectManagerServer
</pre>
</div>
<div class="refsect1">
<a name="GDBusObjectManagerServer.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GDBusObjectManagerServer implements
 <a class="link" href="GDBusObjectManager.html" title="GDBusObjectManager">GDBusObjectManager</a>.</p>
</div>
<div class="refsect1">
<a name="GDBusObjectManagerServer.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GDBusObjectManagerServer.html#GDBusObjectManagerServer--connection" title='The "connection" property'>connection</a>"               <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>*      : Read / Write
  "<a class="link" href="GDBusObjectManagerServer.html#GDBusObjectManagerServer--object-path" title='The "object-path" property'>object-path</a>"              <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1">
<a name="GDBusObjectManagerServer.description"></a><h2>Description</h2>
<p>
<a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> is used to export <a class="link" href="GDBusObject.html" title="GDBusObject"><span class="type">GDBusObject</span></a> instances using
the standardized <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager" target="_top">org.freedesktop.DBus.ObjectManager</a>
interface. For example, remote D-Bus clients can get all objects
and properties in a single call. Additionally, any change in the
object hierarchy is broadcast using signals. This means that D-Bus
clients can keep caches up to date by only listening to D-Bus
signals.
</p>
<p>
See <a class="link" href="GDBusObjectManagerClient.html" title="GDBusObjectManagerClient"><span class="type">GDBusObjectManagerClient</span></a> for the client-side code that is
intended to be used with <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> or any D-Bus
object implementing the org.freedesktop.DBus.ObjectManager
interface.
</p>
</div>
<div class="refsect1">
<a name="GDBusObjectManagerServer.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GDBusObjectManagerServer-struct"></a><h3>GDBusObjectManagerServer</h3>
<pre class="programlisting">typedef struct _GDBusObjectManagerServer GDBusObjectManagerServer;</pre>
<p>
The <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> structure contains private data and should
only be accessed using the provided API.
</p>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusObjectManagerServerClass"></a><h3>struct GDBusObjectManagerServerClass</h3>
<pre class="programlisting">struct GDBusObjectManagerServerClass {
  GObjectClass parent_class;
};
</pre>
<p>
Class structure for <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="GDBusObjectManagerServerClass.parent-class"></a>parent_class</code></em>;</span></p></td>
<td>The parent class.</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-object-manager-server-new"></a><h3>g_dbus_object_manager_server_new ()</h3>
<pre class="programlisting"><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="returnvalue">GDBusObjectManagerServer</span></a> * g_dbus_object_manager_server_new
                                                        (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>);</pre>
<p>
Creates a new <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> object.
</p>
<p>
The returned server isn't yet exported on any connection. To do so,
use <a class="link" href="GDBusObjectManagerServer.html#g-dbus-object-manager-server-set-connection" title="g_dbus_object_manager_server_set_connection ()"><code class="function">g_dbus_object_manager_server_set_connection()</code></a>. Normally you
want to export all of your objects before doing so to avoid <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager" target="_top">InterfacesAdded</a>
signals being emitted.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>The object path to export the manager object at.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> object. Free with <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-object-manager-server-get-connection"></a><h3>g_dbus_object_manager_server_get_connection ()</h3>
<pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   g_dbus_object_manager_server_get_connection
                                                        (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>);</pre>
<p>
Gets the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> used by <em class="parameter"><code>manager</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td>
<td>A <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> object or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
<em class="parameter"><code>manager</code></em> isn't exported on a connection. The returned object should
be freed with <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-object-manager-server-set-connection"></a><h3>g_dbus_object_manager_server_set_connection ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_object_manager_server_set_connection
                                                        (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> *connection</code></em>);</pre>
<p>
Exports all objects managed by <em class="parameter"><code>manager</code></em> on <em class="parameter"><code>connection</code></em>. If
<em class="parameter"><code>connection</code></em> is <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, stops exporting objects.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td>
<td>A <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-object-manager-server-export"></a><h3>g_dbus_object_manager_server_export ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_object_manager_server_export (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GDBusObjectSkeleton.html" title="GDBusObjectSkeleton"><span class="type">GDBusObjectSkeleton</span></a> *object</code></em>);</pre>
<p>
Exports <em class="parameter"><code>object</code></em> on <em class="parameter"><code>manager</code></em>.
</p>
<p>
If there is already a <a class="link" href="GDBusObject.html" title="GDBusObject"><span class="type">GDBusObject</span></a> exported at the object path,
then the old object is removed.
</p>
<p>
The object path for <em class="parameter"><code>object</code></em> must be in the hierarchy rooted by the
object path for <em class="parameter"><code>manager</code></em>.
</p>
<p>
Note that <em class="parameter"><code>manager</code></em> will take a reference on <em class="parameter"><code>object</code></em> for as long as
it is exported.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td>
<td>A <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>A <a class="link" href="GDBusObjectSkeleton.html" title="GDBusObjectSkeleton"><span class="type">GDBusObjectSkeleton</span></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-object-manager-server-export-uniquely"></a><h3>g_dbus_object_manager_server_export_uniquely ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_object_manager_server_export_uniquely
                                                        (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GDBusObjectSkeleton.html" title="GDBusObjectSkeleton"><span class="type">GDBusObjectSkeleton</span></a> *object</code></em>);</pre>
<p>
Like <a class="link" href="GDBusObjectManagerServer.html#g-dbus-object-manager-server-export" title="g_dbus_object_manager_server_export ()"><code class="function">g_dbus_object_manager_server_export()</code></a> but appends a string of
the form <code class="literal">_N</code> (with N being a natural number) to
<em class="parameter"><code>object</code></em>'s object path if an object with the given path
already exists. As such, the <a class="link" href="GDBusObjectProxy.html#GDBusObjectProxy--g-object-path" title='The "g-object-path" property'><span class="type">"g-object-path"</span></a> property
of <em class="parameter"><code>object</code></em> may be modified.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td>
<td>A <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>An object.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-object-manager-server-unexport"></a><h3>g_dbus_object_manager_server_unexport ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_dbus_object_manager_server_unexport
                                                        (<em class="parameter"><code><a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a> *manager</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object_path</code></em>);</pre>
<p>
If <em class="parameter"><code>manager</code></em> has an object at <em class="parameter"><code>path</code></em>, removes the object. Otherwise
does nothing.
</p>
<p>
Note that <em class="parameter"><code>object_path</code></em> must be in the hierarchy rooted by the
object path for <em class="parameter"><code>manager</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td>
<td>A <a class="link" href="GDBusObjectManagerServer.html" title="GDBusObjectManagerServer"><span class="type">GDBusObjectManagerServer</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_path</code></em> :</span></p></td>
<td>An object path.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if object at <em class="parameter"><code>object_path</code></em> was removed, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
</div>
<div class="refsect1">
<a name="GDBusObjectManagerServer.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GDBusObjectManagerServer--connection"></a><h3>The <code class="literal">"connection"</code> property</h3>
<pre class="programlisting">  "connection"               <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>*      : Read / Write</pre>
<p>
The <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> to export objects on.
</p>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="GDBusObjectManagerServer--object-path"></a><h3>The <code class="literal">"object-path"</code> property</h3>
<pre class="programlisting">  "object-path"              <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>
The object path to register the manager object at.
</p>
<p>Default value: NULL</p>
<p class="since">Since 2.30</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>